<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/27/027
 * Time: 8:57
 */

namespace app\common\service;


use rongyun\api\RongCloud;

class ChatService
{
    private static $instance;
    private static $ins;

    private function __construct()
    {
        self::$instance = self::getInstance();
    }

    public static function getInstance()
    {
        if (!self::$instance){
            self::$instance = new RongCloud(config('rongyun')['appKey'],config('rongyun')['appSecret']);
        }
        return self::$instance;
    }

    /**
     * 获取3.0版本对象
     * Created by xiaosong
     * E-mail:4155433@gmail.com
     */
    public static function getIns()
    {
        if (!self::$ins){
            self::$ins = new \RongCloud\RongCloud(config('rongyun')['appKey'],config('rongyun')['appSecret']);
        }
        return self::$ins;
    }

}